SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create PROCEDURE [dbo].[deleteArchiveRowFromWorkingList]
(
    @PropertyIDList    varchar(MAX) = ''
)

AS

BEGIN
    
    update [lch].[dbo].[WorkingList]
	set [InArchive] = 0
	WHERE PropertyId IN (SELECT intval
                         FROM dbo.SPLIT_INT(@PropertyIDList,','))
                         
    select isnull(PropertyLocation, '') + ', ' + rtrim(ltrim(isnull(ZipCode, ''))) as Location
	from WorkingList
	where PropertyId IN (SELECT intval
                         FROM dbo.SPLIT_INT(@PropertyIDList,','))                         
    
END